/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session;

import entity.Resource;
import java.util.Collection;
import javax.ejb.EJB;
import javax.ejb.Singleton;
import javax.ejb.Stateless;
import session.manager.ResourceManagerBeanLocal;

/**
 *
 * @author antonio
 */
@Stateless
public class ModifyResourceConstructSessionBean implements ModifyResourceConstructSessionBeanLocal {

    @EJB
    private ResourceManagerBeanLocal resourceManager;
  
    
    
    @Override
    public Collection<Resource> getResources() {
        return resourceManager.findAll();
        
    }

    @Override
    public void update(Collection<Resource> resources) {
        for (Resource resource : resources) {
            resourceManager.edit(resource);
        }
    }
   
}
